<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="/struts-tags" prefix="s"%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><s:text name="editTuangou"/></title>
<link href="<s:url value="/css/style.css"/>" rel="stylesheet" type="text/css" />
<link href="<s:url value="/css/admin.css"/>" rel="stylesheet" type="text/css" />
<script src="<s:url value="/js/jquery.js"/>" type="text/javascript"></script>
<s:include value="../common/calendar.jsp"></s:include>
<s:include value="../common/showEditor.jsp"></s:include>
</head>
<body>
<div class="container">
	<div class="title"><s:text name="tuangouStation"><s:param>${currentCity.name}</s:param></s:text>
		&gt;&gt;<s:text name="editTuangou"/>
		<s:if test="from eq 'today'">&gt;&gt;<s:text name="tuangouToday"/></s:if>
	</div>
	<div class="content">
		<form action="<s:url value='/admin/shop/%{currentTuan.id}'/>" method="post" enctype="multipart/form-data">
		<input type="hidden" name="_method" value="put">
		<input type="hidden" name="from" value="${from}">
		<input type="hidden" name="cityId" value="${cityId}">
			<table class="tab1">
				<tbody>
					<tr>
						<td width="90"><s:text name="tuangouName"/></td>
						<td>
							<input type="text" name="name" value="${currentTuan.name}" size="50">
						</td>
					</tr>
					<tr>
						<td><s:text name="tuangouNickName"/></td>
						<td>
							<input type="text" name="nick" value="${currentTuan.nick}" size="50">
						</td>
					</tr>
					<tr>
						<td width="80"><s:text name="tuangouSeller"/></td>
						<td>
							<input type="text" name="seller" value="${currentTuan.seller}" size="50">
						</td>
					</tr>
					<tr>
						<td width="80"><s:text name="shopWebsite"/></td>
						<td>
							<input type="text" name="website" value="${currentTuan.website}" size="50">
						</td>
					</tr>
					<tr>
						<td><s:text name="simpleDescribe"/></td>
						<td>
							<textarea rows="10" cols="45" name="simpleDescribe">${currentTuan.simpleDescribe}</textarea>
						</td>
					</tr>
					<tr>
						<td>售出方式</td>
						<td>
							<s:select list="accordTypes" listKey="type" listValue="%{getText(name())}" name="accordType" value="%{currentTuan.accordType.type}">
							</s:select>
						</td>
					</tr>
					<tr>
						<td><s:text name="currentPrice"/></td>
						<td>
							<input type="text" name="currentPrice" value="${currentTuan.currentPrice}" size="50"/>
						</td>
					</tr>
					<tr>
						<td><s:text name="originalPrice"/></td>
						<td>
							<input type="text" name="originalPrice" value="${currentTuan.originalPrice}" size="50"/>
						</td>
					</tr>
					<tr>
						<td><s:text name="discount"/></td>
						<td>
							<input type="text" name="discount" value="${currentTuan.discount}" size="50"/>
						</td>
					</tr>
					<tr>
						<td><s:text name="limitPerson"/></td>
						<td>
							<input type="text" name="limitPerson" value="${currentTuan.limitPerson}" size="50"/>
						</td>
					</tr>
					<tr>
						<td><s:text name="publishTime"/></td>
						<td>
							<input type="text" name="publishTime" id="d12"
							 value="<s:date name='currentTuan.publishTime' format='yyyy-MM-dd'/>" size="50"/>
							 <img onclick="WdatePicker({el:'d12'})" src="<s:url value='/javascript/My97DatePicker/skin/datePicker.gif'/>"
							  width="16" height="22" align="absmiddle"/>
						</td>
					</tr>
					<tr>
						<td><s:text name="expireDate"/></td>
						<td>
							<input type="text" name="expireDate" id="d13"
							 value="<s:date name='currentTuan.expireDate' format='yyyy-MM-dd'/>" size="50"/>
							 <img onclick="WdatePicker({el:'d13'})" src="<s:url value='/javascript/My97DatePicker/skin/datePicker.gif'/>"
							  width="16" height="22" align="absmiddle"/>
						</td>
					</tr>
					<tr>
						<td><s:text name="uploadedHeadImage"/></td>
						<td>
							<img src="<s:url value='%{currentTuan.headImg.iconImg}'/>"/>
						</td>
					</tr>
					<tr>
						<td><s:text name="headImage"/></td>
						<td>
							<input type="file" name="image" value="${currentTuan.headImg.path}" size="50"/>
						</td>
					</tr>
					<tr>
						<td><s:text name="tuangouTip"/></td>
						<td>
							<textarea rows="10" cols="45" name="tip">${currentTuan.tip}</textarea>
						</td>
					</tr>
					<tr>
						<td><s:text name="tuangouLight"/></td>
						<td>
							<textarea rows="10" cols="45" name="light">${currentTuan.light}</textarea>
						</td>
					</tr>
					<tr>
						<td><s:text name="tuangouAddress"/></td>
						<td>
							<textarea rows="10" cols="45" name="address">${currentTuan.address}</textarea>
						</td>
					</tr>
					<tr>
						<td><s:text name="tuangouTraffic"/></td>
						<td>
							<textarea rows="10" cols="45" name="traffic">${currentTuan.traffic}</textarea>
						</td>
					</tr>
					<tr>
						<td><s:text name="tuangouMap"/></td>
						<td>
							<label><s:text name="longitude"/></label>
							<input type="text" name="longitude" value="${currentTuan.longitude}"/>
							<label><s:text name="latitude"/></label>
							<input type="text" name="latitude" value="${currentTuan.latitude}"/>
							<label><s:text name="mapLevel"/></label>
							<input type="text" name="mapLevel" value="${currentTuan.mapLevel}"/>
							<br/>
							<label><s:text name="mapLink"/></label>
							<input type="text" name="mapLink" value="${currentTuan.mapLink}" size="100"/>
						</td>
					</tr>
					<tr>
						<td><s:text name="publishedStatus"/></td>
						<td>
							<s:select list="#{true:'已发布',false:'未发布'}" value="%{currentTuan.published}" name="published"></s:select>
						</td>
					</tr>
					<tr>
						<td colspan="2"><s:text name="tuangouDetail"/></td>
					</tr>
				</tbody>
			</table>
			<div class="btns">
				<textarea id="content1" style="width:420px;height:300px;" name="detail">${currentTuan.detail}</textarea>
				<input type="submit" value="提交" class="btn" />
				<input type="reset" value="重置" class="btn" />
			</div>
		</form>
	</div>
</div>
</body>
</html>